package com.jams.goodox.net.services;

import com.jams.goodox.constant.UrlConstants;
import com.jams.goodox.entity.UpLoadPicBean;
import com.jams.goodox.entity.resp.FastCarListResp;
import com.jams.goodox.net.BaseEntity;

import java.util.List;
import java.util.Map;

import okhttp3.MultipartBody;
import retrofit2.Call;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.PUT;
import retrofit2.http.Part;
import retrofit2.http.Query;
import retrofit2.http.QueryMap;

/**
 * 好司机带带我
 * Created by guozhen.hou on 2017/6/14.
 */

public interface FastCarService {
    //顺风车主页信息(分页)
    @GET(UrlConstants.getRideHomeInfo)
    Call<FastCarListResp> getRideHomeInfo(@QueryMap Map<String,String> params);

    //车主订单列表(分页）
    @GET(UrlConstants.getOwnerOrderList)
    Call<FastCarListResp> getOwnerOrderList(@QueryMap Map<String,String> params);

    //乘客订单列表
    @GET(UrlConstants.getPassengerOrderList)
    Call<FastCarListResp> getPassengerOrderList(@QueryMap Map<String,String> params);

    //发布行程
    @FormUrlEncoded
    @POST(UrlConstants.issueRoute)
    Call<BaseEntity> issueRoute(@FieldMap Map<String,Object> params);

    //车主认证
    @FormUrlEncoded
    @POST(UrlConstants.authOwner)
    Call<BaseEntity> authOwner(@FieldMap Map<String,String> params);

    //抢单
    @PUT(UrlConstants.robOrder)
    Call<BaseEntity> robOrder(@Query("id") String id,@Query("ownerId") String ownerId);

    //取消订单
    @PUT(UrlConstants.cancelOrder)
    Call<BaseEntity> cancelOrder(@Query("id") String id);

    //取消订单
    @PUT(UrlConstants.sureGetOn)
    Call<BaseEntity> sureGetOn(@Query("id") String id);

    //判断用户是否在黑名单
    @GET(UrlConstants.checkUserIsInBlackList)
    Call<BaseEntity> checkUserIsInBlackList(@Query("userId") String userId);

    //上传多图片
    @Multipart
    @POST(UrlConstants.rewardPicturesUploads)
    Call<UpLoadPicBean> uploadFastCarImages(@Part List<MultipartBody.Part> partList);
}
